package com.wamke.mapper;

import com.github.pagehelper.Page;
import com.wamke.pojo.Emplyoee;
import com.wamke.pojo.EmplyoeeDTO;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface EmployeeMapper {

    @Select("select *  from emp where username =#{username} and password =#{password}")
    void select(String username, String password);

    @Select("select  *  from emp ")
    List<Emplyoee> selectAll();

    Page<Emplyoee> selectBynameAndGender(EmplyoeeDTO emplyoeeDTO);

    @Select("select * from emp where id = #{id}")
    Emplyoee getById(Long id);

    void update(Emplyoee emplyoee);

    @Delete("delete from emp where id =#{id}")
    void delete(String id);
}
